package day_2022_4_to_7.day48;

import java.util.Scanner;

/**
 * @author haomin
 * @date 2022/04/28 08:54
 **/
public class Day10_2_PasswordStrengthLevel {
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        String str = in.next();
        int lenScore = len(str);
        int letScore = let(str);
        int numScore = num(str);
        int symScore = sym(str);
        int rewordScore = reword(str,letScore,numScore,symScore);
        int totalScore = lenScore +letScore + numScore + symScore +rewordScore;
        printTotalScore(totalScore);
    }

    private static void printTotalScore(int total) {
        if(total >= 90){
            System.out.println("VERY_SECURE");
        }else if(total >= 80){
            System.out.println("SECURE");
        }else if(total >= 70){
            System.out.println("VERY_STRONG");
        }else if(total >= 60){
            System.out.println("STRONG");
        }else if(total >= 50){
            System.out.println("AVERAGE");
        }else if(total >= 20){
            System.out.println("WEAK");
        }else if(total >= 0){
            System.out.println("VERY_WEAK");
        }
    }

    private static int reword(String str, int letScore, int numScore, int symScore) {
        if(letScore == 10 && numScore > 0 && symScore == 0){
            return 2;
        }
        else if(letScore == 10 && numScore > 0 && symScore > 0){
            return 3;
        }
        else if(letScore == 20 && numScore > 0 && symScore > 0){
            return 5;
        }
        return 0;
    }


    private static int sym(String str) {
        int count = 0;
        for (int i = 0; i < str.length(); i++) {
            if(str.charAt(i) >= 33 && str.charAt(i) <= 47){
                count++;
            }
        }
        for (int i = 0; i < str.length(); i++) {
            if(str.charAt(i) >= 58 && str.charAt(i) <= 64){
                count++;
            }
        }
        for (int i = 0; i < str.length(); i++) {
            if(str.charAt(i) >= 91 && str.charAt(i) <= 96){
                count++;
            }
        }
        for (int i = 0; i < str.length(); i++) {
            if(str.charAt(i) >= 123 && str.charAt(i) <= 126){
                count++;
            }
        }

        if(count == 0){
            return 0;
        }else if(count == 1){
            return 10;
        }else {
            return 25;
        }
    }

    private static int num(String str) {
        int count = 0;
        for (int i = 0; i < str.length(); i++) {
            if(str.charAt(i) >= 48 && str.charAt(i) <= 57){
                count++;
            }
        }
        if(count == 0){
            return 0;
        }else if(count == 1){
            return 10;
        }else {
            return 20;
        }
    }

    private static int let(String str) {
        boolean upperLet = false;
        boolean lowerLet = false;
        for (int i = 0; i < str.length(); i++) {
            if(65 <= str.charAt(i) && str.charAt(i) <=90){
                upperLet = true;
            }
        }
        for (int i = 0; i < str.length(); i++) {
            if(97 <= str.charAt(i) && str.charAt(i) <=122){
                lowerLet = true;
            }
        }
        if(upperLet && lowerLet){
            return 20;
        }else if(upperLet || lowerLet){
            return 10;
        }else {
            return 0;
        }
    }

    private static int len(String str) {
        int length = str.length();
        if(length <= 4){
            return 5;
        }else if(length <= 7){
            return 10;
        }else {
            return 25;
        }
    }
}